// Camera.h
#include <QObject>
#include <QImage>
#include <QGraphicsScene>

class Car;

class Camera : public QObject {
    Q_OBJECT
public:
    explicit Camera(QGraphicsScene* scene, Car* car, QObject* parent = nullptr);
    QImage captureView() const;
    QPoint processImage(const QImage& image) const;

private:
    QGraphicsScene* m_scene;
    Car* m_car;
    qreal m_viewWidth = 200.0;
    qreal m_viewHeight = 150.0;
};